package services

import (
	"familytree/dao"
	"familytree/models"
)

func Getconnection() (error, []models.Connection) {
	connectionData, err := dao.Selectconnection()
	return err, connectionData
}

func Updateconnection(Connection models.Connection) error {
	err := dao.Updateconnection(Connection)
	return err
}

func Addconnection(Connection models.Connection) error {
	err := dao.Addconnection(Connection)
	return err
}

func Delconnection(id string) error {
	err := dao.Deletconnection(id)
	return err
}
